<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ECharts</title>
    <!-- 引入 echarts.js -->
    <script src="echarts.min.js"></script>
</head>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例  $("#main")
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: 'ECharts 入门示例'
        },
        tooltip: {show:false},
        legend: {
            data:['销量','销量2']
        },
        //xAxis: {type:"category"}, value
        xAxis: {type:"category"},
        yAxis: {},
        dataset:{
            dimensions: ['product', '2015','2016'],
            source: [
                {product: '衬衫', '2015': 43.3, '2016': 23.3},
                {product: '羊毛衫', '2015': 83.1, '2016': 23.3},
                {product: '雪纺衫', '2015': 86.4, '2016': 433.3},
                {product: '裤子', '2015': 72.4, '2016': 413.3}
            ]
        },
        series: [{
            name: '销量',
            type: 'bar',
        },{
            name: '销量2',
            type: 'line',
            //smooth: true,
        }]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</body>
</html>